Tools, FAQ, Tutorials:
ENTRYPOINT [...] - Specify Entrypoint Executable
How to specify the executable program to the ENTRYPOINT instruction in DockerFile?
✍: FYIcenter.com
The ENTRYPOINT instruction has two different syntax formats.
1. Executable Program Format - Executable Program Format allows you to specify the path name of an executable program file and its parameters in a JSON array format.
ENTRYPOINT ["executable", "param1", "param2", ...]
2. Shell Command Format - Shell Command Format allows you to specify the name of a shell command and its parameters in a command line format.
ENTRYPOINT command param1 param2 ...
When you use the Shell Command Format, the specified command will be executed using "/bin/sh -c" as the actual executable program. For example:
If you specify the following in the Dockerfile: ENTRYPOINT echo Hello! The container will start with: /bin/sh -c 'echo Hello!'
So it's better to use Executable Program Format, which gives you more direct control.
⇒ Build "sleep" Image from Alpine
⇐ Build "hello" Image from Alpine
2019-02-09, ∼2126🔥, 0💬
Popular Posts:
How To Read the Entire File into a Single String in PHP? If you have a file, and you want to read th...
How to Build my "sleep" Docker image from the Alpine image? I want the container to sleep for 10 hou...
How to add request query string Parameters to my Azure API operation to make it more user friendly? ...
How To Set session.gc_divisor Properly in PHP? As you know that session.gc_divisor is the frequency ...
How to Install Docker Desktop 2.5.0 on Windows 10? You can follow this tutorial to Install Docker De...